package org.firebug.spring.boot.swagger.api.qo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.firebug.common.core.dict.Gender;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@ApiModel("用户QO")
public class UserQO {
    @ApiModelProperty(value = "姓名", required = false, example = "felix")
    private String name;

    @ApiModelProperty(value = "性别", required = false, example = "M")
    private Gender gender;

    @ApiModelProperty(value = "生日", required = true, example = "2008-11-04")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
    private Date birthDate;

    @ApiModelProperty(value = "页长", required = false, example = "1")
    private Integer page = 1;

    @ApiModelProperty(value = "页码", required = false, example = "10")
    private Integer size = 10;
}
